
import 'dart:ui';

class AreaItem{
  Path path;
  String name;

   int drawColor;

  void drawItem(Canvas canvas, Paint paint, bool isSelected) {
    //选中时绘制阴影描边效果
    if (isSelected) {
      paint.strokeWidth = 2;
      paint.color = Color.fromARGB(0xff, 0, 0, 0);
      paint.style = PaintingStyle.fill;
      canvas.drawPath(path, paint);

      paint.color = Color(drawColor);
      paint.style = PaintingStyle.fill;
      paint.strokeWidth = 2;
      canvas.drawPath(path, paint);

    } else {
      //非选中时，绘制描边效果
      paint.strokeWidth = 1;
      paint.style = PaintingStyle.fill;
      paint.color = Color(drawColor);
      canvas.drawPath(path, paint);

      paint.style = PaintingStyle.stroke;
      int strokeColor = 0xFFD0E8F4;
      paint.color = Color(strokeColor);
      canvas.drawPath(path, paint);
    }
  }


}